﻿/* ----------------------------------------------------------------------------
 * Copyright (c) Rob Ashton 2009
 *
 * This source code is subject to terms and conditions of the Microsoft Public 
 * License (Ms-PL).
 * 
 * By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 * 
 * To request a copy of the Microsoft Public License, send a request by email
 * to license@mvcex.com
 *
 * This notice must not be removed from this software.
 * ---------------------------------------------------------------------------- */

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using NUnit.Framework;
using System.Web.Mvc;
using MvcEx.Controllers;

namespace MvcEx.Tests
{
    [TestFixture]
    public class MvcExActionContainerTests
    {
        [Test]
        public void initialize_base_action_container()
        {
            MvcExActionContainer actionContainer = new MvcExActionContainer();
            MvcExController controller = new MvcExController(null);

            // Call the initialize method
            TestHelper.CallMethod(actionContainer, "Initialize", controller);

            // Check the property has been set
            Object obj = TestHelper.GetField(actionContainer, "mParent");
            Assert.AreEqual(controller, obj);
        }
    }
}
